<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>文章列表 - 社交阅读平台</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            --primary: #4263eb;
            --primary-light: #eef0ff;
            --secondary: #36b37e;
            --light-gray: #f8f9fa;
            --dark-gray: #343a40;
            --text-gray: #6c757d;
            --border-color: #e9ecef;
        }
        
        body {
            background-color: #f8f9fa;
            font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
            color: #333;
            line-height: 1.6;
        }
        
        .container {
            max-width: 1200px;
        }
        
        .header {
            padding: 1.5rem 0;
            border-bottom: 1px solid var(--border-color);
            margin-bottom: 2rem;
        }
        
        .logo {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--primary);
            text-decoration: none;
        }
        
        .filter-section {
            background-color: white;
            border-radius: 8px;
            padding: 1.5rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            margin-bottom: 2rem;
        }
        
        .search-bar {
            position: relative;
            margin-bottom: 1.5rem;
        }
        
        .search-bar input {
            width: 100%;
            padding: 0.75rem 1rem 0.75rem 2.5rem;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            font-size: 0.95rem;
            transition: all 0.2s ease;
        }
        
        .search-bar input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(66, 99, 235, 0.1);
        }
        
        .search-bar i {
            position: absolute;
            left: 0.75rem;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-gray);
        }
        
        .filter-group {
            margin-bottom: 1.5rem;
        }
        
        .filter-title {
            font-weight: 600;
            margin-bottom: 0.75rem;
            color: var(--dark-gray);
            font-size: 1.1rem;
        }
        
        .filter-options {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
        }
        
        .filter-chip {
            padding: 0.35rem 1rem;
            background-color: var(--light-gray);
            border: 1px solid var(--border-color);
            border-radius: 20px;
            font-size: 0.9rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .filter-chip:hover {
            border-color: var(--primary);
            color: var(--primary);
        }
        
        .filter-chip.active {
            background-color: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        .filter-chip i {
            margin-right: 5px;
        }
        
        .advanced-filters {
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;
            margin-bottom: 1.5rem;
        }
        
        .form-select {
            padding: 0.375rem 1.75rem 0.375rem 0.75rem;
            border-radius: 6px;
            border-color: var(--border-color);
            font-size: 0.95rem;
        }
        
        .form-select:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(66, 99, 235, 0.1);
        }
        
        .filter-actions {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 1rem;
        }
        
        .btn-reset {
            background-color: transparent;
            color: var(--text-gray);
            border: 1px solid var(--border-color);
            padding: 0.375rem 1rem;
            border-radius: 6px;
            font-size: 0.95rem;
            transition: all 0.2s ease;
        }
        
        .btn-reset:hover {
            background-color: var(--light-gray);
            color: var(--dark-gray);
        }
        
        .btn-apply {
            background-color: var(--primary);
            color: white;
            border: none;
            padding: 0.375rem 1.5rem;
            border-radius: 6px;
            font-size: 0.95rem;
            transition: all 0.2s ease;
        }
        
        .btn-apply:hover {
            background-color: #3654d2;
        }
        
        .view-options {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
        }
        
        .view-title {
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--dark-gray);
        }
        
        .view-count {
            color: var(--text-gray);
            font-size: 0.95rem;
            margin-left: 0.5rem;
        }
        
        .layout-buttons {
            display: flex;
            gap: 0.5rem;
        }
        
        .layout-btn {
            background-color: white;
            border: 1px solid var(--border-color);
            width: 36px;
            height: 36px;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-gray);
            transition: all 0.2s ease;
        }
        
        .layout-btn:hover {
            border-color: var(--primary);
            color: var(--primary);
        }
        
        .layout-btn.active {
            background-color: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        .article-card {
            background-color: white;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            margin-bottom: 1.5rem;
        }
        
        .article-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        }
        
        .article-author {
            display: flex;
            align-items: center;
            margin-bottom: 0.75rem;
        }
        
        .author-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            margin-right: 0.75rem;
        }
        
        .author-name {
            font-weight: 600;
            font-size: 0.9rem;
        }
        
        .post-time {
            font-size: 0.8rem;
            color: var(--text-gray);
        }
        
        .article-title {
            font-size: 1.25rem;
            font-weight: 600;
            margin-bottom: 0.75rem;
            transition: color 0.2s ease;
            text-decoration: none;
            color: var(--dark-gray);
        }
        
        .article-title:hover {
            color: var(--primary);
        }
        
        .article-excerpt {
            color: var(--text-gray);
            font-size: 0.95rem;
            line-height: 1.6;
            margin-bottom: 1rem;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        .article-meta {
            display: flex;
            align-items: center;
            font-size: 0.85rem;
            color: var(--text-gray);
            flex-wrap: wrap;
        }
        
        .meta-item {
            display: flex;
            align-items: center;
            margin-right: 1.25rem;
            margin-bottom: 0.5rem;
        }
        
        .meta-item i {
            margin-right: 4px;
            font-size: 0.9rem;
        }
        
        .article-actions {
            display: flex;
            margin-left: auto;
            gap: 0.5rem;
        }
        
        .action-btn {
            background: none;
            border: none;
            color: var(--text-gray);
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            gap: 4px;
            padding: 4px 8px;
            border-radius: 4px;
            transition: all 0.2s ease;
        }
        
        .action-btn:hover {
            background-color: var(--light-gray);
            color: var(--primary);
        }
        
        .action-btn.liked {
            color: #e74c3c;
        }
        
        .action-btn.saved {
            color: var(--secondary);
        }
        
        .article-category {
            display: inline-block;
            padding: 0.2rem 0.6rem;
            background-color: var(--primary-light);
            color: var(--primary);
            border-radius: 4px;
            font-size: 0.8rem;
            margin-right: 0.5rem;
            margin-bottom: 0.5rem;
        }
        
        /* 列表布局 */
        .list-layout .article-card {
            display: flex;
        }
        
        .list-layout .article-image {
            width: 220px;
            flex-shrink: 0;
            position: relative;
            overflow: hidden;
            height: 160px;
        }
        
        .list-layout .article-image.multi-image {
            display: grid;
            grid-template-columns: 1fr 1fr;
            grid-template-rows: 1fr 1fr;
            gap: 2px;
            padding: 2px;
        }
        
        .list-layout .article-image.no-image {
            background-color: var(--light-gray);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-gray);
        }
        
        .list-layout .article-content {
            flex-grow: 1;
            padding: 1.25rem;
            display: flex;
            flex-direction: column;
        }
        
        /* 网格布局 */
        .grid-layout {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 1.5rem;
        }
        
        .grid-layout .article-card {
            flex-direction: column;
            height: 100%;
        }
        
        .grid-layout .article-image {
            width: 100%;
            height: 180px;
            position: relative;
            overflow: hidden;
        }
        
        .grid-layout .article-image.multi-image {
            display: grid;
            grid-template-columns: 1fr 1fr;
            grid-template-rows: 1fr 1fr;
            gap: 2px;
            padding: 2px;
        }
        
        .grid-layout .article-image.no-image {
            background-color: var(--light-gray);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-gray);
            height: 180px;
        }
        
        .grid-layout .article-content {
            padding: 1.25rem;
            flex-grow: 1;
            display: flex;
            flex-direction: column;
        }
        
        /* 紧凑布局 */
        .compact-layout .article-card {
            padding: 1rem;
            display: flex;
            align-items: center;
        }
        
        .compact-layout .article-image {
            width: 80px;
            height: 80px;
            border-radius: 6px;
            overflow: hidden;
            margin-right: 1rem;
            flex-shrink: 0;
        }
        
        .compact-layout .article-image.no-image {
            background-color: var(--light-gray);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-gray);
        }
        
        .compact-layout .article-content {
            flex-grow: 1;
            min-width: 0;
        }
        
        .compact-layout .article-title {
            font-size: 1.1rem;
            margin-bottom: 0.25rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .compact-layout .article-excerpt,
        .compact-layout .article-author {
            display: none;
        }
        
        .image-count {
            position: absolute;
            bottom: 8px;
            right: 8px;
            background-color: rgba(0,0,0,0.6);
            color: white;
            font-size: 0.75rem;
            padding: 2px 6px;
            border-radius: 4px;
            z-index: 1;
        }
        
        .image-item {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 2px;
        }
        
        .load-more {
            text-align: center;
            margin: 2rem 0;
        }
        
        .load-more-btn {
            background-color: white;
            border: 1px solid var(--border-color);
            color: var(--primary);
            padding: 0.5rem 2rem;
            border-radius: 6px;
            font-size: 0.95rem;
            transition: all 0.2s ease;
        }
        
        .load-more-btn:hover {
            background-color: var(--primary);
            color: white;
        }
        
        .no-results {
            text-align: center;
            padding: 4rem 2rem;
            background-color: white;
            border-radius: 8px;
            margin-bottom: 2rem;
        }
        
        .no-results i {
            font-size: 3rem;
            color: var(--text-gray);
            margin-bottom: 1rem;
        }
        
        .no-results p {
            color: var(--text-gray);
            font-size: 1.1rem;
        }
        
        @media (max-width: 768px) {
            .list-layout .article-card {
                flex-direction: column;
            }
            
            .list-layout .article-image {
                width: 100%;
                height: 180px;
            }
            
            .advanced-filters {
                flex-direction: column;
                gap: 0.75rem;
            }
            
            .form-select {
                width: 100%;
            }
            
            .filter-actions {
                flex-direction: column;
                gap: 0.75rem;
            }
            
            .btn-reset, .btn-apply {
                width: 100%;
            }
            
            .article-actions {
                margin-left: 0;
                margin-top: 0.75rem;
                width: 100%;
                justify-content: space-between;
            }
            
            .meta-item {
                margin-bottom: 0.5rem;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <!-- 页头 -->
        <div class="header">
            <a href="#" class="logo">ReadSocial</a>
        </div>
        
        <!-- 筛选区域 -->
        <div class="filter-section">
            <!-- 搜索框 -->
            <div class="search-bar">
                <i class="fas fa-search"></i>
                <input type="text" placeholder="搜索文章、作者或关键词...">
            </div>
            
            <!-- 分类筛选 -->
            <div class="filter-group">
                <div class="filter-title">内容分类</div>
                <div class="filter-options">
                    <div class="filter-chip active"><i class="fas fa-th"></i>全部</div>
                    <div class="filter-chip"><i class="fas fa-laptop-code"></i>科技</div>
                    <div class="filter-chip"><i class="fas fa-book"></i>文化</div>
                    <div class="filter-chip"><i class="fas fa-home"></i>生活</div>
                    <div class="filter-chip"><i class="fas fa-plane"></i>旅行</div>
                    <div class="filter-chip"><i class="fas fa-utensils"></i>美食</div>
                    <div class="filter-chip"><i class="fas fa-briefcase"></i>职场</div>
                    <div class="filter-chip"><i class="fas fa-palette"></i>艺术</div>
                    <div class="filter-chip"><i class="fas fa-heartbeat"></i>健康</div>
                    <div class="filter-chip"><i class="fas fa-graduation-cap"></i>教育</div>
                </div>
            </div>
            
            <!-- 时间筛选 -->
            <div class="filter-group">
                <div class="filter-title">发布时间</div>
                <div class="filter-options">
                    <div class="filter-chip active"><i class="fas fa-clock"></i>不限</div>
                    <div class="filter-chip"><i class="fas fa-sun"></i>今天</div>
                    <div class="filter-chip"><i class="fas fa-calendar-week"></i>本周</div>
                    <div class="filter-chip"><i class="fas fa-calendar"></i>本月</div>
                    <div class="filter-chip"><i class="fas fa-calendar-alt"></i>今年</div>
                </div>
            </div>
            
            <!-- 热门程度筛选 -->
            <div class="filter-group">
                <div class="filter-title">热门程度</div>
                <div class="filter-options">
                    <div class="filter-chip active"><i class="fas fa-fire"></i>综合推荐</div>
                    <div class="filter-chip"><i class="fas fa-eye"></i>最多浏览</div>
                    <div class="filter-chip"><i class="fas fa-heart"></i>最多点赞</div>
                    <div class="filter-chip"><i class="fas fa-comment"></i>最多评论</div>
                    <div class="filter-chip"><i class="fas fa-bookmark"></i>最多收藏</div>
                </div>
            </div>
            
            <!-- 高级筛选 -->
            <div class="advanced-filters">
                <select class="form-select" style="width: auto;">
                    <option value="">作者认证</option>
                    <option value="all">全部作者</option>
                    <option value="verified">仅认证作者</option>
                </select>
                
                <select class="form-select" style="width: auto;">
                    <option value="">内容类型</option>
                    <option value="all">全部内容</option>
                    <option value="article">纯文字</option>
                    <option value="image">图文</option>
                    <option value="video">视频</option>
                </select>
                
                <select class="form-select" style="width: auto;">
                    <option value="">阅读时长</option>
                    <option value="all">不限</option>
                    <option value="short">短阅读 (≤5分钟)</option>
                    <option value="medium">中等阅读 (5-15分钟)</option>
                    <option value="long">长阅读 (≥15分钟)</option>
                </select>
            </div>
            
            <!-- 筛选操作按钮 -->
            <div class="filter-actions">
                <button class="btn-reset">重置筛选</button>
                <button class="btn-apply">应用筛选</button>
            </div>
        </div>
        
        <!-- 视图选项 -->
        <div class="view-options">
            <div>
                <span class="view-title">文章列表</span>
                <span class="view-count">(找到 24 篇相关文章)</span>
            </div>
            <div class="layout-buttons">
                <button class="layout-btn active" data-layout="list" title="列表布局">
                    <i class="fas fa-list"></i>
                </button>
                <button class="layout-btn" data-layout="grid" title="网格布局">
                    <i class="fas fa-th-large"></i>
                </button>
                <button class="layout-btn" data-layout="compact" title="紧凑布局">
                    <i class="fas fa-align-justify"></i>
                </button>
            </div>
        </div>
        
        <!-- 文章列表 -->
        <div class="article-container list-layout">
            <!-- 单图文章 -->
            <div class="article-card">
                <div class="article-image">
                    <img src="https://picsum.photos/600/400?random=1" alt="城市建筑摄影" class="w-100 h-100 object-cover">
                </div>
                <div class="article-content">
                    <div>
                        <span class="article-category">摄影</span>
                        <span class="article-category">建筑</span>
                    </div>
                    <div class="article-author">
                        <img src="https://picsum.photos/100/100?random=101" alt="作者头像" class="author-avatar">
                        <div>
                            <div class="author-name">建筑摄影师林辰</div>
                            <div class="post-time">2小时前</div>
                        </div>
                    </div>
                    <a href="#" class="article-title">现代建筑中的光影美学：探索城市几何之美</a>
                    <p class="article-excerpt">本文将带您领略现代建筑设计中的光影运用，从几何结构到材料选择，解析建筑师如何通过光线塑造空间感，以及这些设计如何影响我们的日常生活体验。</p>
                    <div class="article-meta">
                        <div class="meta-item">
                            <i class="fas fa-eye"></i> 2.4k
                        </div>
                        <div class="meta-item">
                            <i class="fas fa-comment"></i> 86
                        </div>
                        <div class="meta-item">
                            <i class="fas fa-bookmark"></i> 328
                        </div>
                        <div class="article-actions">
                            <button class="action-btn like-btn">
                                <i class="far fa-heart"></i> 542
                            </button>
                            <button class="action-btn save-btn">
                                <i class="far fa-bookmark"></i> 收藏
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 多图文章 -->
            <div class="article-card">
                <div class="article-image multi-image">
                    <img src="https://picsum.photos/300/300?random=2" alt="旅行照片1" class="image-item">
                    <img src="https://picsum.photos/300/300?random=3" alt="旅行照片2" class="image-item">
                    <img src="https://picsum.photos/300/300?random=4" alt="旅行照片3" class="image-item">
                    <img src="https://picsum.photos/300/300?random=5" alt="旅行照片4" class="image-item">
                    <div class="image-count">4图</div>
                </div>
                <div class="article-content">
                    <div>
                        <span class="article-category">旅行</span>
                        <span class="article-category">户外</span>
                    </div>
                    <div class="article-author">
                        <img src="https://picsum.photos/100/100?random=102" alt="作者头像" class="author-avatar">
                        <div>
                            <div class="author-name">旅行者阿乔</div>
                            <div class="post-time">3天前</div>
                        </div>
                    </div>
                    <a href="#" class="article-title">徒步喜马拉雅：在世界屋脊寻找内心平静</a>
                    <p class="article-excerpt">记录了为期15天的喜马拉雅徒步之旅，从准备工作到沿途见闻，分享高海拔徒步的注意事项和那些令人终生难忘的雪山美景。</p>
                    <div class="article-meta">
                        <div class="meta-item">
                            <i class="fas fa-eye"></i> 3.2k
                        </div>
                        <div class="meta-item">
                            <i class="fas fa-comment"></i> 124
                        </div>
                        <div class="meta-item">
                            <i class="fas fa-bookmark"></i> 587
                        </div>
                        <div class="article-actions">
                            <button class="action-btn like-btn">
                                <i class="far fa-heart"></i> 786
                            </button>
                            <button class="action-btn save-btn">
                                <i class="far fa-bookmark"></i> 收藏
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 无图文章 -->
            <div class="article-card">
                <div class="article-image no-image">
                    <i class="fas fa-pen-fancy text-4xl"></i>
                </div>
                <div class="article-content">
                    <div>
                        <span class="article-category">思想</span>
                        <span class="article-category">社会</span>
                    </div>
                    <div class="article-author">
                        <img src="https://picsum.photos/100/100?random=103" alt="作者头像" class="author-avatar">
                        <div>
                            <div class="author-name">哲学家张明</div>
                            <div class="post-time">1周前</div>
                        </div>
                    </div>
                    <a href="#" class="article-title">数字化时代的注意力危机：我们如何重新掌控自己的专注</a>
                    <p class="article-excerpt">在信息爆炸的今天，我们的注意力正被不断切割和分散。本文从心理学和哲学角度分析注意力危机的根源，探讨数字时代的专注之道，以及如何在碎片化世界中保持深度思考的能力。</p>
                    <div class="article-meta">
                        <div class="meta-item">
                            <i class="fas fa-eye"></i> 5.1k
                        </div>
                        <div class="meta-item">
                            <i class="fas fa-comment"></i> 327
                        </div>
                        <div class="meta-item">
                            <i class="fas fa-bookmark"></i> 1243
                        </div>
                        <div class="article-actions">
                            <button class="action-btn like-btn">
                                <i class="far fa-heart"></i> 1876
                            </button>
                            <button class="action-btn save-btn">
                                <i class="far fa-bookmark"></i> 收藏
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 单图文章 -->
            <div class="article-card">
                <div class="article-image">
                    <img src="https://picsum.photos/600/400?random=6" alt="咖啡制作" class="w-100 h-100 object-cover">
                </div>
                <div class="article-content">
                    <div>
                        <span class="article-category">美食</span>
                        <span class="article-category">饮品</span>
                    </div>
                    <div class="article-author">
                        <img src="https://picsum.photos/100/100?random=104" alt="作者头像" class="author-avatar">
                        <div>
                            <div class="author-name">咖啡师马克</div>
                            <div class="post-time">5天前</div>
                        </div>
                    </div>
                    <a href="#" class="article-title">手冲咖啡的水温控制艺术：解锁不同风味层次</a>
                    <p class="article-excerpt">水温是影响咖啡风味的关键因素之一，本文详细解析不同水温如何提取咖啡中的酸、甜、苦等风味物质，以及如何根据不同咖啡豆调整最佳水温。</p>
                    <div class="article-meta">
                        <div class="meta-item">
                            <i class="fas fa-eye"></i> 1.8k
                        </div>
                        <div class="meta-item">
                            <i class="fas fa-comment"></i> 64
                        </div>
                        <div class="meta-item">
                            <i class="fas fa-bookmark"></i> 328
                        </div>
                        <div class="article-actions">
                            <button class="action-btn like-btn">
                                <i class="far fa-heart"></i> 328
                            </button>
                            <button class="action-btn save-btn">
                                <i class="far fa-bookmark"></i> 收藏
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 加载更多 -->
        <div class="load-more">
            <button class="load-more-btn">
                <i class="fas fa-spinner fa-spin me-2" style="display: none;"></i>
                加载更多文章
            </button>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    <script>
        // 布局切换功能
        document.querySelectorAll('.layout-btn').forEach(btn => {
            btn.addEventListener('click', function() {
                // 更新按钮激活状态
                document.querySelectorAll('.layout-btn').forEach(b => {
                    b.classList.remove('active');
                });
                this.classList.add('active');
                
                // 切换布局类
                const layout = this.getAttribute('data-layout');
                const container = document.querySelector('.article-container');
                
                // 移除所有布局类
                container.classList.remove('list-layout', 'grid-layout', 'compact-layout');
                
                // 添加选中的布局类
                container.classList.add(`${layout}-layout`);
            });
        });
        
        // 筛选芯片选择功能
        document.querySelectorAll('.filter-chip').forEach(chip => {
            chip.addEventListener('click', function() {
                // 获取同组中的所有芯片
                const parentGroup = this.closest('.filter-options');
                
                // 移除同组中其他芯片的激活状态
                parentGroup.querySelectorAll('.filter-chip').forEach(c => {
                    c.classList.remove('active');
                });
                
                // 激活当前芯片
                this.classList.add('active');
            });
        });
        
        // 点赞功能
        document.querySelectorAll('.like-btn').forEach(btn => {
            btn.addEventListener('click', function() {
                this.classList.toggle('liked');
                const icon = this.querySelector('i');
                const countText = this.textContent.trim();
                const count = parseInt(countText.match(/\d+/)[0]);
                
                if (this.classList.contains('liked')) {
                    icon.classList.remove('far');
                    icon.classList.add('fas');
                    this.innerHTML = `<i class="fas fa-heart"></i> ${count + 1}`;
                } else {
                    icon.classList.remove('fas');
                    icon.classList.add('far');
                    this.innerHTML = `<i class="far fa-heart"></i> ${count - 1}`;
                }
            });
        });
        
        // 收藏功能
        document.querySelectorAll('.save-btn').forEach(btn => {
            btn.addEventListener('click', function() {
                this.classList.toggle('saved');
                const icon = this.querySelector('i');
                
                if (this.classList.contains('saved')) {
                    icon.classList.remove('far');
                    icon.classList.add('fas');
                    this.innerHTML = `<i class="fas fa-bookmark"></i> 已收藏`;
                } else {
                    icon.classList.remove('fas');
                    icon.classList.add('far');
                    this.innerHTML = `<i class="far fa-bookmark"></i> 收藏`;
                }
            });
        });
        
        // 重置筛选按钮
        document.querySelector('.btn-reset').addEventListener('click', function() {
            // 重置所有筛选芯片
            document.querySelectorAll('.filter-options').forEach(group => {
                const chips = group.querySelectorAll('.filter-chip');
                chips.forEach(chip => chip.classList.remove('active'));
                // 激活第一个芯片（通常是"全部"或"不限"）
                if (chips.length > 0) {
                    chips[0].classList.add('active');
                }
            });
            
            // 重置下拉选择框
            document.querySelectorAll('.form-select').forEach(select => {
                select.selectedIndex = 0;
            });
            
            // 清空搜索框
            document.querySelector('.search-bar input').value = '';
        });
        
        // 应用筛选按钮
        document.querySelector('.btn-apply').addEventListener('click', function() {
            // 收集所有筛选条件
            const filters = {
                category: document.querySelector('.filter-group:nth-child(2) .filter-chip.active').textContent,
                time: document.querySelector('.filter-group:nth-child(3) .filter-chip.active').textContent,
                popularity: document.querySelector('.filter-group:nth-child(4) .filter-chip.active').textContent,
                author: document.querySelectorAll('.form-select')[0].value,
                content: document.querySelectorAll('.form-select')[1].value,
                duration: document.querySelectorAll('.form-select')[2].value,
                search: document.querySelector('.search-bar input').value
            };
            
            console.log('应用筛选条件:', filters);
            
            // 模拟筛选加载
            const articles = document.querySelectorAll('.article-card');
            articles.forEach(article => {
                article.style.opacity = '0.5';
            });
            
            // 2秒后恢复正常显示（实际应用中会根据筛选条件加载新内容）
            setTimeout(() => {
                articles.forEach(article => {
                    article.style.opacity = '1';
                });
            }, 800);
        });
        
        // 加载更多功能
        document.querySelector('.load-more-btn').addEventListener('click', function() {
            const spinner = this.querySelector('.fa-spinner');
            spinner.style.display = 'inline-block';
            this.disabled = true;
            
            // 模拟加载延迟
            setTimeout(() => {
                spinner.style.display = 'none';
                this.disabled = false;
                // 实际应用中这里会加载并添加更多文章
            }, 1500);
        });
    </script>
</body>
</html>
    
